import request from "@/utils/request";

// 查询提货券列表
export function listMarketVoucher(query) {
  return request({
    url: "/mall/marketVoucher/list",
    method: "get",
    params: query,
  });
}

// 查询提货券详细
export function getMarketVoucher(id) {
  return request({
    url: "/mall/marketVoucher/" + id,
    method: "get",
  });
}

// 新增提货券
export function addMarketVoucher(data) {
  return request({
    url: "/mall/marketVoucher",
    method: "post",
    data: data,
  });
}

// 修改提货券
export function updateMarketVoucher(data) {
  return request({
    url: "/mall/marketVoucher",
    method: "put",
    data: data,
  });
}

// 删除提货券
export function delMarketVoucher(id) {
  return request({
    url: "/mall/marketVoucher/" + id,
    method: "delete",
  });
}

// 店铺列表
export function mallStoreList(query) {
  return request({
    url: "/mall/mallStore/innerList",
    method: "get",
    params: query,
  });
}

// 修改状态
export function editState(query) {
  return request({
    url: "/mall/marketVoucher/edit/state",
    method: "get",
    params: query,
  });
}
